package cn.com.cifi.mars.common.enums;

/**
 * @author plx
 */
public enum RedisChannelEnum {
    /**
     * 去化率指令通道
     */
    CHANNEL_REMOVAL("command:removal","去化率指令通道")
    ;

    private String code;

    private String name;

    RedisChannelEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


    public static RedisChannelEnum getByCode(String code){
        for (RedisChannelEnum localCommandEnum : values()) {
            if (localCommandEnum.getCode().equals(code)){
                return localCommandEnum;
            }
        }
        return null;
    }
}
